package com.fancyy.scm.base.databinding;

import android.databinding.BindingAdapter;
import android.widget.AdapterView;
import android.widget.BaseAdapter;
import android.widget.GridView;


/**
 * Created by zyh on 2017/8/16.
 */

public class GridViewBindingAdapter {
    @BindingAdapter({"adapter"})
    public static void adapter(GridView gridView, BaseAdapter adapter){
        gridView.setAdapter(adapter);

    }

    @BindingAdapter({"onItemClick"})
    public static void onItemClick(GridView gridView, AdapterView.OnItemClickListener listener){
        gridView.setOnItemClickListener(listener);
    }



}
